403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/03030105.html
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WeekDay Function</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="weekday"></a>
<a name="bm_id3153127"></a>
  <meta itemprop="keywords" content="WeekDay function">


<h1 id="hd_id3153127" dir="auto">
<a name="WeekDay_H1"></a>WeekDay Function</h1>
<p id="par_id3146795" class="paragraph" dir="auto">This function returns the number corresponding to the weekday represented by a serial date number that is generated by the <span class="literal">DateSerial</span> or the <span class="literal">DateValue</span> functions.</p>

<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id91620239579003" dir="auto">This help page describes the <span class="literal">WeekDay</span> function used in Basic scripts. If you are interested in the <span class="literal">WeekDay</span> function used in LibreOffice Calc, refer to <a target="_top" href="en-US/text/scalc/01/func_weekday.html">this help page</a>.</p></div>
</div>
<br>
<div class="embedded">
<a name="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Syntax:</h3>
</div>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
  WeekDay (SerialDate, [FirstDayOfWeek])
</code></pre></div>
<div class="embedded">
<a name="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parameters:</h3>
</div>
<p id="par_id3151042" class="paragraph" dir="auto">
<span class="emph">SerialDate:</span> Integer expression that contains the serial date number that is used to calculate the day of the week.</p>
<p id="par_id351619718411921" class="paragraph" dir="auto">
<span class="emph">FirstDayOfWeek:</span> Integer value indicating which weekday should be considered as the first day of the week. The default value is <span class="emph">0</span>, meaning that the system locale settings are used to determine the first day of the week.</p>
<p id="par_id411619718769819" class="paragraph" dir="auto">The parameter <span class="emph">FirstDayOfWeek</span> accepts values ranging from 0 to 7. The table below describes the meaning of each possible value:</p>
<a name="WeekDay_constants"></a>
<table border="1" class="" cellpadding="0" cellspacing="0">
   <tr>
       <th rowspan="" colspan="" class="tableheadcell" dir="auto">
           <p id="par_id651619719561092" class="tableheadintable" dir="auto">Value</p>
       </th>
       <th rowspan="" colspan="" class="tableheadcell" dir="auto">
           <p id="par_id251619718816238" class="tableheadintable" dir="auto">VBA Constant</p>
       </th>
       <th rowspan="" colspan="" class="tableheadcell" dir="auto">
           <p id="par_id711619718816238" class="tableheadintable" dir="auto">Description</p>
       </th>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718847838" class="tablecontentintable" dir="auto">0</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718847702" class="tablecontentintable" dir="auto">vbUseSystemDayOfWeek</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id521619718818972" class="tablecontentintable" dir="auto">Use system locale settings</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719164117" class="tablecontentintable" dir="auto">1</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718847885" class="tablecontentintable" dir="auto">vbSunday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719174897" class="tablecontentintable" dir="auto">Sunday (default)</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719164241" class="tablecontentintable" dir="auto">2</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718844633" class="tablecontentintable" dir="auto">vbMonday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719173258" class="tablecontentintable" dir="auto">Monday</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719168871" class="tablecontentintable" dir="auto">3</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718840122" class="tablecontentintable" dir="auto">vbTuesday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719174633" class="tablecontentintable" dir="auto">Tuesday</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719162897" class="tablecontentintable" dir="auto">4</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718843362" class="tablecontentintable" dir="auto">vbWednesday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719173641" class="tablecontentintable" dir="auto">Wednesday</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719168022" class="tablecontentintable" dir="auto">5</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718849336" class="tablecontentintable" dir="auto">vbThursday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719170014" class="tablecontentintable" dir="auto">Thursday</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719164776" class="tablecontentintable" dir="auto">6</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718849699" class="tablecontentintable" dir="auto">vbFriday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719174271" class="tablecontentintable" dir="auto">Friday</p>
       </td>
   </tr>
   <tr>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id821619719169044" class="tablecontentintable" dir="auto">7</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id731619718849001" class="tablecontentintable" dir="auto">vbSaturday</p>
       </td>
       <td rowspan="" colspan="" dir="auto">
           <p id="par_id581619719176055" class="tablecontentintable" dir="auto">Saturday</p>
       </td>
   </tr>
</table>
<br>

<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id451619720094202" dir="auto">The VBA constants listed above are only available if VBA support has been enabled. For more information, read the <a target="_top" href="en-US/text/sbasic/shared/03103350.html">VBASupport Statement</a> help page.</p></div>
</div>
<br>

<div class="embedded">
<a name="functvalue"></a>
<h3 id="hd_id061420171139087480" dir="auto">Return value:</h3>
</div>
<p id="par_id3154125" class="paragraph" dir="auto">Integer</p>
<div class="embedded">
<a name="errorcode"></a>
<h3 id="hd_id3152869" dir="auto">Error codes:</h3>
</div>
<div class="embedded"><p class="embedded" dir="auto">5 Invalid procedure call</p></div>
<div class="embedded">
<a name="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Example:</h3>
</div>
<p id="par_id3159254" class="paragraph" dir="auto">The following example uses the function <span class="literal">Now()</span> to determine the current weekday.</p>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
Sub ExampleWeekDay
    Dim sDay As String
    ' Return And display the day of the week
    Select Case WeekDay( Now )
            Case 1: sDay="Sunday"
            Case 2: sDay="Monday"
            Case 3: sDay="Tuesday"
            Case 4: sDay="Wednesday"
            Case 5: sDay="Thursday"
            Case 6: sDay="Friday"
            Case 7: sDay="Saturday"
    End Select
    MsgBox "" + sDay,64,"Today Is"
End Sub
</code></pre></div>
<p id="par_id891619721286262" class="paragraph" dir="auto">The following example illustrates the use <span class="emph">FirstDayOfWeek</span> parameter, assuming that Tuesday is the first day of the week.</p>
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Click on text to copy to clipboard"><pre dir="auto"><code class="language-visual-basic line-numbers">
  Dim someDay As Long
  ' The date January 1st 2021 was a Friday
  someDay = DateSerial(2021, 01, 01)
  ' Prints "6" assuming Sunday is the first day of the week
  MsgBox WeekDay(someDay)
  ' Prints "4" assuming Tuesday is the first day of the week
  MsgBox WeekDay(someDay, 3)
</code></pre></div>

<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
  <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030101.html">DateSerial Function</a></p></div>
  <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030102.html">DateValue Function</a></p></div>
  <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030203.html">Now Function</a></p></div>
  <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/scalc/01/func_weekday.html">WEEKDAY</a> </p></div>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03030105.xhp" target="_blank">/text/sbasic/shared/03030105.xhp</a></p>
<p dir="auto">Title is: WeekDay Function</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit